'use strict';

describe('ruleFilter', function() {
  var $rule;

  beforeEach(module('fbdApp.ruleModule'));
  beforeEach(inject(function(_$filter_) {
    $rule = _$filter_('ruleFilter');
    // $save = _$filter_('saveRuleFilter');
  }));

  it('should be defined', function(done) {
    expect($rule).toBeDefined();
    return done();
  });

  var rule = {
    name: 'rule1',
    type: 1,
    beginText: '<<<',
    limit: 5,
    similar: 5,
    mode: 'signs'
  };

  var expected = {
    rule1: {
      name: 'rule1',
      type: 1,
      beginText: '<<<',
      limit: 5,
      similar: 5,
      mode: 'signs',
      subset: {}
    }
  };

  it('rule filter', function(done) {
    expect($rule(rule)).toEqual(expected);
    return done();
  });


});
